package org.millioncall.yueyoga.admin.action.pad;

import javax.servlet.http.HttpServletRequest;

import org.millioncall.yueyoga.admin.model.User;
import org.millioncall.yueyoga.common.GlobalService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;

@Controller
public abstract class BasePadAction {
	// 获取当前pad登录用户
	public User getPadLoginUser(HttpServletRequest request) {
		User u = (User) request.getSession().getAttribute("padLoginUser");
		return u;
	}

	/**
	 * 初始化header里面的变量
	 * 
	 * @param model
	 */
	protected void initFrontHeader(HttpServletRequest request, ModelMap model) {
		GlobalService.initBasicData(request, model);
	}
}
